/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package slcu.service.persistence;

import com.liferay.portal.service.persistence.BasePersistence;

import slcu.model.Director;

/**
 * The persistence interface for the Director service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author tito
 * @see DirectorPersistenceImpl
 * @see DirectorUtil
 * @generated
 */
public interface DirectorPersistence extends BasePersistence<Director> {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link DirectorUtil} to access the Director persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
	 */

	/**
	* Caches the Director in the entity cache if it is enabled.
	*
	* @param director the Director
	*/
	public void cacheResult(slcu.model.Director director);

	/**
	* Caches the Directors in the entity cache if it is enabled.
	*
	* @param directors the Directors
	*/
	public void cacheResult(java.util.List<slcu.model.Director> directors);

	/**
	* Creates a new Director with the primary key. Does not add the Director to the database.
	*
	* @param directorId the primary key for the new Director
	* @return the new Director
	*/
	public slcu.model.Director create(long directorId);

	/**
	* Removes the Director with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param directorId the primary key of the Director
	* @return the Director that was removed
	* @throws slcu.NoSuchDirectorException if a Director with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Director remove(long directorId)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchDirectorException;

	public slcu.model.Director updateImpl(slcu.model.Director director,
		boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the Director with the primary key or throws a {@link slcu.NoSuchDirectorException} if it could not be found.
	*
	* @param directorId the primary key of the Director
	* @return the Director
	* @throws slcu.NoSuchDirectorException if a Director with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Director findByPrimaryKey(long directorId)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchDirectorException;

	/**
	* Returns the Director with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param directorId the primary key of the Director
	* @return the Director, or <code>null</code> if a Director with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Director fetchByPrimaryKey(long directorId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the Directors where mail = &#63;.
	*
	* @param mail the mail
	* @return the matching Directors
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Director> findByMail(java.lang.String mail)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the Directors where mail = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param mail the mail
	* @param start the lower bound of the range of Directors
	* @param end the upper bound of the range of Directors (not inclusive)
	* @return the range of matching Directors
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Director> findByMail(
		java.lang.String mail, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the Directors where mail = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param mail the mail
	* @param start the lower bound of the range of Directors
	* @param end the upper bound of the range of Directors (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching Directors
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Director> findByMail(
		java.lang.String mail, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first Director in the ordered set where mail = &#63;.
	*
	* @param mail the mail
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching Director
	* @throws slcu.NoSuchDirectorException if a matching Director could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Director findByMail_First(java.lang.String mail,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchDirectorException;

	/**
	* Returns the first Director in the ordered set where mail = &#63;.
	*
	* @param mail the mail
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching Director, or <code>null</code> if a matching Director could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Director fetchByMail_First(java.lang.String mail,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last Director in the ordered set where mail = &#63;.
	*
	* @param mail the mail
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching Director
	* @throws slcu.NoSuchDirectorException if a matching Director could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Director findByMail_Last(java.lang.String mail,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchDirectorException;

	/**
	* Returns the last Director in the ordered set where mail = &#63;.
	*
	* @param mail the mail
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching Director, or <code>null</code> if a matching Director could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Director fetchByMail_Last(java.lang.String mail,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the Directors before and after the current Director in the ordered set where mail = &#63;.
	*
	* @param directorId the primary key of the current Director
	* @param mail the mail
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next Director
	* @throws slcu.NoSuchDirectorException if a Director with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Director[] findByMail_PrevAndNext(long directorId,
		java.lang.String mail,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchDirectorException;

	/**
	* Returns all the Directors.
	*
	* @return the Directors
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Director> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the Directors.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of Directors
	* @param end the upper bound of the range of Directors (not inclusive)
	* @return the range of Directors
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Director> findAll(int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the Directors.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of Directors
	* @param end the upper bound of the range of Directors (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of Directors
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Director> findAll(int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the Directors where mail = &#63; from the database.
	*
	* @param mail the mail
	* @throws SystemException if a system exception occurred
	*/
	public void removeByMail(java.lang.String mail)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the Directors from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of Directors where mail = &#63;.
	*
	* @param mail the mail
	* @return the number of matching Directors
	* @throws SystemException if a system exception occurred
	*/
	public int countByMail(java.lang.String mail)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of Directors.
	*
	* @return the number of Directors
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;
}